import { short64 } from "./short.js";

let prev = 0;
let seq = 0;
export function uuid() {
  const now = Date.now();
  if (now === prev) {
    return short64(now) + "." + short64(seq++);
  }

  prev = now;
  seq = 0;
  return short64(prev);
}
